package com.yitiao.designmodel.struct.flyweight;

/**
 * 具体享元类
 */
public class ConcreteFlyweight implements Flyweight{

    // 保证对象状态的不可变性
    private final String intrinsicState;

    public ConcreteFlyweight(String intrinsicState) {
        this.intrinsicState = intrinsicState;
    }

    @Override
    public void operation() {
        System.out.println("ConcreteFlyweight: " + intrinsicState);
    }
}
